<template>
    <div class="sys-page">
        <el-input-number v-model="colNum"></el-input-number>
        <el-button @click="changeNum()" >aaavv</el-button>
        <el-table stripe border style="width:100%">
            <el-table-column v-for="(col, index) in cols" :label="col.label" :key="col.label+index">
                <el-table-column v-for="col2 in cols" :label="col2.label">

                </el-table-column>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                cols:[{
                    label: "aaa"
                },{
                    label: "bbb"
                }],
                colNum: 2
            }
        },
        methods: {
            changeNum(){
                console.log("111")
                //this.colNum += 1
                this.cols.push({label: `L${this.colNum}`})
            }

        }
    }
</script>


